
let bound = 100;
let score = Math.random() * bound;
console.log(score);
console.log(Math.trunc(score));
score |= 0 ; // score = score | 0 ;
console.log(score | 0);

if( score > 100 ) {
    console.log('不合理值');
} else if( score >= 90 ) {
    console.log('优秀');
} else if( score >= 80 ) {
    console.log('良好');
} else if( score >= 70 ) {
    console.log('平常');
} else if( score >= 60 ) {
    console.log('尚可');
} else if( score >= 0 ) {
    console.log('劣等');
} else {
    console.log('不合理值');
}

console.log( '- '.repeat(10) );

let day = ( Math.random() * 7 ) | 0 ;
console.log( day );
switch(day) {
    case 0:
        console.log('周日');
        break;
    case 1:
        console.log('周一');
        break;
    case 2:
        console.log('周二');
        break;
    case 3:
        console.log('周三');
        break;
    case 4:
        console.log('周四');
        break;
    case 5:
        console.log('周五');
        break;
    case 6:
        console.log('周六');
        break;
    default:
        console.log('不合理的数值');
}